/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2022-11-16
 * Time: 17:52
 */
public class RecurFactorial {
    public static int recurFactorial(int n) {
        if (n == 1 || n == 2 ) {
            return 1;
        }
        return recurFactorial(n-1) + recurFactorial(n-2);
    }
    public static void main(String[] args) {
        int n = 8;
        System.out.println(recurFactorial(n));
    }
}
